Skip to main content

Search and Top Navigation

Ticket #4773: ie select fix.patch
File ie select fix.patch, 1.3 KB (added by stakach, August 13, 2009 02:10AM UTC)

IE selection patch

Index: ui.core.js
===================================================================
--- ui.core.js	(revision 3051)
+++ ui.core.js	(working copy)
@@ -161,14 +161,16 @@
 		return this
 			.attr('unselectable', 'off')
 			.css('MozUserSelect', '')
-			.unbind('selectstart.ui');
+			.unbind('selectstart.ui')
+			.unbind('selectstart.disableTextSelect');	//ie select enable
 	},
 
 	disableSelection: function() {
 		return this
 			.attr('unselectable', 'on')
 			.css('MozUserSelect', 'none')
-			.bind('selectstart.ui', function() { return false; });
+			.bind('selectstart.ui', function() { return false; })
+			.bind('selectstart.disableTextSelect', function() { return false; }); //ie select disable
 	},
 
 	scrollParent: function() {
@@ -413,12 +415,6 @@
 				}
 			});
 
-		// Prevent text selection in IE
-		if ($.browser.msie) {
-			this._mouseUnselectable = this.element.attr('unselectable');
-			this.element.attr('unselectable', 'on');
-		}
-
 		this.started = false;
 	},
 
@@ -426,10 +422,6 @@
 	// other instances of mouse
 	_mouseDestroy: function() {
 		this.element.unbind('.'+this.widgetName);
-
-		// Restore text selection in IE
-		($.browser.msie
-			&& this.element.attr('unselectable', this._mouseUnselectable));
 	},
 
 	_mouseDown: function(event) {

Download in other formats:

Original Format